package com.jeady.timetodo.activities

import android.content.Intent
import android.os.Bundle
import android.os.CountDownTimer
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.ui.platform.LocalContext
import com.jeady.timetodo.ui.theme.TimeToDoTheme

class WakeActivity: ComponentActivity() {
    private val TAG: String = "[JJJ]W"

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        Log.e(TAG, "onCreate: wake activity")
        setContent {
            TimeToDoTheme {
                val context = LocalContext.current
                Column {
                    Button(onClick = {
                        val i = Intent(context, MainActivity::class.java)
                        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                        context.startActivity(i)
                    }) {
                        Text("Back")
                    }
                }
                Text(text = "Its time to do sth ")
            }
        }
    }
}